package com.woniu.service.imp;/*
 *
 * @author   米雷
 * @Description
 * @Date:create in 14:40 2020-03-24
 *
 * */

import com.woniu.dao.ServerCommentsMapper;
import com.woniu.dao.ServerOrdersMapper;
import com.woniu.dto.ServerOrderToServer;
import com.woniu.pojo.ServerComments;
import com.woniu.pojo.ServerOrders;
import com.woniu.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PersonServiceImp implements PersonService {

    @Autowired
    ServerOrdersMapper serverOrdersMapper;
    @Autowired
    ServerCommentsMapper serverCommentsMapper;
    @Override
    public List<ServerOrderToServer> getServerOrders(Long id)
    {
        return serverOrdersMapper.getServerOrdersByUserId(id);
    }

    @Override
    public List<ServerComments> getServiceComment(Long id)
    {
        return serverCommentsMapper.getCommentsByServiceId(id);
    }

    @Override
    public List<ServerComments> getUserServiceComments(Long id)
    {
        return serverCommentsMapper.getCommentsByUserId(id);
    }
}
